package com.itheima.tlias84.aop.cglib;


import org.springframework.cglib.proxy.Enhancer;

public class TestCglib {
    public static void main(String[] args) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(Dog.class);
        enhancer.setCallback(new EatInterceptor());
        Dog dog = (Dog) enhancer.create();
        dog.eat();
    }
}
